package com.wwj.core.wawa.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.wwj.core.wawa.entity.PlayerItemChangeRecord;
import com.wwj.core.wawa.entity.mapper.PlayerItemChangeRecordMapper;
import com.wwj.core.wawa.service.IPlayerItemChangeRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by Auser on 2017/11/4.
 */
@Service
public class PlayerItemChangeRecordServiceImpl implements IPlayerItemChangeRecordService {
    @Resource
    private PlayerItemChangeRecordMapper playerItemChangeRecordMapper;

    @Override
    public Page<PlayerItemChangeRecord> findByPlayerIdInPage(Integer playerId, int offset, int limit) {
        PageHelper.offsetPage(offset, limit);
        return (Page<PlayerItemChangeRecord>) playerItemChangeRecordMapper.selectPlayerItemChangeRecordsByPlayerId(playerId);
    }
}
